.class public Lcom/waiqin365/h5/location/WqLocationBackground;
.super Lorg/apache/cordova/CordovaPlugin;


# instance fields
.field private a:Lorg/apache/cordova/WqCordovaActivity;

.field private b:Lorg/apache/cordova/CallbackContext;

.field private c:Lcom/waiqin365/compons/c/f;

.field private d:Lcom/waiqin365/h5/location/a;

.field private e:Lcom/waiqin365/compons/c/g;

.field private f:I

.field private g:Ljava/lang/String;


# direct methods
.method public constructor <init>()V
    .locals 1

    invoke-direct {p0}, Lorg/apache/cordova/CordovaPlugin;-><init>()V

    const/4 v0, 0x0

    iput v0, p0, Lcom/waiqin365/h5/location/WqLocationBackground;->f:I

    const-string/jumbo v0, "0"

    iput-object v0, p0, Lcom/waiqin365/h5/location/WqLocationBackground;->g:Ljava/lang/String;

    return-void
.end method

.method static synthetic a(Lcom/waiqin365/h5/location/WqLocationBackground;Lcom/waiqin365/compons/c/f;)Lcom/waiqin365/compons/c/f;
    .locals 0

    iput-object p1, p0, Lcom/waiqin365/h5/location/WqLocationBackground;->c:Lcom/waiqin365/compons/c/f;

    return-object p1
.end method

.method private a()V
    .locals 2

    iget-object v0, p0, Lcom/waiqin365/h5/location/WqLocationBackground;->d:Lcom/waiqin365/h5/location/a;

    if-nez v0, :cond_0

    new-instance v0, Lcom/waiqin365/h5/location/a;

    invoke-direct {v0, p0}, Lcom/waiqin365/h5/location/a;-><init>(Lcom/waiqin365/h5/location/WqLocationBackground;)V

    iput-object v0, p0, Lcom/waiqin365/h5/location/WqLocationBackground;->d:Lcom/waiqin365/h5/location/a;

    :cond_0
    iget-object v0, p0, Lcom/waiqin365/h5/location/WqLocationBackground;->e:Lcom/waiqin365/compons/c/g;

    if-nez v0, :cond_1

    new-instance v0, Lcom/waiqin365/compons/c/g;

    iget-object v1, p0, Lcom/waiqin365/h5/location/WqLocationBackground;->d:Lcom/waiqin365/h5/location/a;

    invoke-direct {v0, v1}, Lcom/waiqin365/compons/c/g;-><init>(Lcom/waiqin365/compons/c/l;)V

    iput-object v0, p0, Lcom/waiqin365/h5/location/WqLocationBackground;->e:Lcom/waiqin365/compons/c/g;

    :cond_1
    const-string/jumbo v0, "1"

    iget-object v1, p0, Lcom/waiqin365/h5/location/WqLocationBackground;->g:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_3

    iget v0, p0, Lcom/waiqin365/h5/location/WqLocationBackground;->f:I

    rem-int/lit8 v0, v0, 0x2

    if-nez v0, :cond_2

    iget-object v0, p0, Lcom/waiqin365/h5/location/WqLocationBackground;->e:Lcom/waiqin365/compons/c/g;

    invoke-virtual {v0}, Lcom/waiqin365/compons/c/g;->a()V

    :goto_0
    iget-object v0, p0, Lcom/waiqin365/h5/location/WqLocationBackground;->e:Lcom/waiqin365/compons/c/g;

    const/16 v1, 0x2710

    invoke-virtual {v0, v1}, Lcom/waiqin365/compons/c/g;->a(I)V

    iget-object v0, p0, Lcom/waiqin365/h5/location/WqLocationBackground;->e:Lcom/waiqin365/compons/c/g;

    iget-object v1, p0, Lcom/waiqin365/h5/location/WqLocationBackground;->a:Lorg/apache/cordova/WqCordovaActivity;

    invoke-virtual {v0, v1}, Lcom/waiqin365/compons/c/g;->a(Landroid/content/Context;)V

    iget-object v0, p0, Lcom/waiqin365/h5/location/WqLocationBackground;->e:Lcom/waiqin365/compons/c/g;

    invoke-virtual {v0}, Lcom/waiqin365/compons/c/g;->e()V

    iget v0, p0, Lcom/waiqin365/h5/location/WqLocationBackground;->f:I

    add-int/lit8 v0, v0, 0x1

    iput v0, p0, Lcom/waiqin365/h5/location/WqLocationBackground;->f:I

    return-void

    :cond_2
    iget-object v0, p0, Lcom/waiqin365/h5/location/WqLocationBackground;->e:Lcom/waiqin365/compons/c/g;

    invoke-virtual {v0}, Lcom/waiqin365/compons/c/g;->c()V

    goto :goto_0

    :cond_3
    const-string/jumbo v0, "2"

    iget-object v1, p0, Lcom/waiqin365/h5/location/WqLocationBackground;->g:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_4

    iget-object v0, p0, Lcom/waiqin365/h5/location/WqLocationBackground;->e:Lcom/waiqin365/compons/c/g;

    invoke-virtual {v0}, Lcom/waiqin365/compons/c/g;->c()V

    goto :goto_0

    :cond_4
    const-string/jumbo v0, "3"

    iget-object v1, p0, Lcom/waiqin365/h5/location/WqLocationBackground;->g:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_5

    iget-object v0, p0, Lcom/waiqin365/h5/location/WqLocationBackground;->e:Lcom/waiqin365/compons/c/g;

    invoke-virtual {v0}, Lcom/waiqin365/compons/c/g;->a()V

    goto :goto_0

    :cond_5
    iget v0, p0, Lcom/waiqin365/h5/location/WqLocationBackground;->f:I

    rem-int/lit8 v0, v0, 0x2

    if-nez v0, :cond_6

    iget-object v0, p0, Lcom/waiqin365/h5/location/WqLocationBackground;->e:Lcom/waiqin365/compons/c/g;

    invoke-virtual {v0}, Lcom/waiqin365/compons/c/g;->c()V

    goto :goto_0

    :cond_6
    iget-object v0, p0, Lcom/waiqin365/h5/location/WqLocationBackground;->e:Lcom/waiqin365/compons/c/g;

    invoke-virtual {v0}, Lcom/waiqin365/compons/c/g;->a()V

    goto :goto_0
.end method

.method static synthetic a(Lcom/waiqin365/h5/location/WqLocationBackground;)V
    .locals 0

    invoke-direct {p0}, Lcom/waiqin365/h5/location/WqLocationBackground;->b()V

    return-void
.end method

.method static synthetic b(Lcom/waiqin365/h5/location/WqLocationBackground;)Lcom/waiqin365/compons/c/f;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/h5/location/WqLocationBackground;->c:Lcom/waiqin365/compons/c/f;

    return-object v0
.end method

.method private b()V
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/h5/location/WqLocationBackground;->e:Lcom/waiqin365/compons/c/g;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/waiqin365/h5/location/WqLocationBackground;->e:Lcom/waiqin365/compons/c/g;

    invoke-virtual {v0}, Lcom/waiqin365/compons/c/g;->f()V

    :cond_0
    return-void
.end method

.method static synthetic c(Lcom/waiqin365/h5/location/WqLocationBackground;)Lorg/apache/cordova/CallbackContext;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/h5/location/WqLocationBackground;->b:Lorg/apache/cordova/CallbackContext;

    return-object v0
.end method

.method static synthetic d(Lcom/waiqin365/h5/location/WqLocationBackground;)V
    .locals 0

    invoke-direct {p0}, Lcom/waiqin365/h5/location/WqLocationBackground;->a()V

    return-void
.end method

.method static synthetic e(Lcom/waiqin365/h5/location/WqLocationBackground;)Lorg/apache/cordova/WqCordovaActivity;
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/h5/location/WqLocationBackground;->a:Lorg/apache/cordova/WqCordovaActivity;

    return-object v0
.end method

.method static synthetic f(Lcom/waiqin365/h5/location/WqLocationBackground;)I
    .locals 1

    iget v0, p0, Lcom/waiqin365/h5/location/WqLocationBackground;->f:I

    return v0
.end method


# virtual methods
.method public execute(Ljava/lang/String;Lorg/apache/cordova/CordovaArgs;Lorg/apache/cordova/CallbackContext;)Z
    .locals 2

    const/4 v1, 0x0

    iget-object v0, p0, Lcom/waiqin365/h5/location/WqLocationBackground;->cordova:Lorg/apache/cordova/CordovaInterface;

    invoke-interface {v0}, Lorg/apache/cordova/CordovaInterface;->getActivity()Landroid/app/Activity;

    move-result-object v0

    check-cast v0, Lorg/apache/cordova/WqCordovaActivity;

    iput-object v0, p0, Lcom/waiqin365/h5/location/WqLocationBackground;->a:Lorg/apache/cordova/WqCordovaActivity;

    iput-object p3, p0, Lcom/waiqin365/h5/location/WqLocationBackground;->b:Lorg/apache/cordova/CallbackContext;

    iput v1, p0, Lcom/waiqin365/h5/location/WqLocationBackground;->f:I

    if-eqz p2, :cond_0

    invoke-virtual {p2, v1}, Lorg/apache/cordova/CordovaArgs;->isNull(I)Z

    move-result v0

    if-nez v0, :cond_0

    invoke-virtual {p2, v1}, Lorg/apache/cordova/CordovaArgs;->getString(I)Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v1

    if-nez v1, :cond_0

    const-string/jumbo v1, "null"

    invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-nez v1, :cond_0

    :try_start_0
    new-instance v1, Lorg/json/JSONObject;

    invoke-direct {v1, v0}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    const-string/jumbo v0, "locationType"

    invoke-virtual {v1, v0}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/waiqin365/h5/location/WqLocationBackground;->g:Ljava/lang/String;

    const-string/jumbo v0, "0"

    iget-object v1, p0, Lcom/waiqin365/h5/location/WqLocationBackground;->g:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_0

    const-string/jumbo v0, "1"

    iget-object v1, p0, Lcom/waiqin365/h5/location/WqLocationBackground;->g:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_0

    const-string/jumbo v0, "2"

    iget-object v1, p0, Lcom/waiqin365/h5/location/WqLocationBackground;->g:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_0

    const-string/jumbo v0, "3"

    iget-object v1, p0, Lcom/waiqin365/h5/location/WqLocationBackground;->g:Ljava/lang/String;

    invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-nez v0, :cond_0

    const-string/jumbo v0, "0"

    iput-object v0, p0, Lcom/waiqin365/h5/location/WqLocationBackground;->g:Ljava/lang/String;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    :cond_0
    :goto_0
    iget-object v0, p0, Lcom/waiqin365/h5/location/WqLocationBackground;->a:Lorg/apache/cordova/WqCordovaActivity;

    invoke-static {v0}, Lcom/waiqin365/compons/c/d;->d(Landroid/content/Context;)V

    invoke-direct {p0}, Lcom/waiqin365/h5/location/WqLocationBackground;->a()V

    const/4 v0, 0x1

    return v0

    :catch_0
    move-exception v0

    const-string/jumbo v1, "0"

    iput-object v1, p0, Lcom/waiqin365/h5/location/WqLocationBackground;->g:Ljava/lang/String;

    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_0
.end method

.method public onDestroy()V
    .locals 1

    iget-object v0, p0, Lcom/waiqin365/h5/location/WqLocationBackground;->e:Lcom/waiqin365/compons/c/g;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/waiqin365/h5/location/WqLocationBackground;->e:Lcom/waiqin365/compons/c/g;

    invoke-virtual {v0}, Lcom/waiqin365/compons/c/g;->h()V

    :cond_0
    invoke-super {p0}, Lorg/apache/cordova/CordovaPlugin;->onDestroy()V

    return-void
.end method
